package com.thwj.project.pay.enums;

/***
 * 付款 线上线下
 */
public enum OrderSourceTypeEnum {

    activity_sign_up(1,"活动报名订单", "A"),
    VIP_ORDER(2,"会员订单","V"),
    ;
    OrderSourceTypeEnum(int value, String name,String orderPrefix){
        this.name = name;
        this.value = value;
        this.orderPrefix = orderPrefix;
    }

    private int value;
    private String name;
    private String orderPrefix;

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public String getOrderPrefix() {
        return orderPrefix;
    }

    public static OrderSourceTypeEnum getEnumByValue(Integer value){
        for (OrderSourceTypeEnum typeEnum : OrderSourceTypeEnum.values()) {
            if(typeEnum.value == value) {
                return typeEnum;
            }
        }
        return null;
    }



}
